diff --git a/Mage.Server/src/main/java/mage/server/game/GamesRoomImpl.java b/Mage.Server/src/main/java/mage/server/game/GamesRoomImpl.java
index 85a868464b..e7f218b88e 100644
--- a/Mage.Server/src/main/java/mage/server/game/GamesRoomImpl.java
+++ b/Mage.Server/src/main/java/mage/server/game/GamesRoomImpl.java
@@ -251,20 +251,28 @@ class TableListSorter implements Comparator
{
} else {
return two.getEndTime().compareTo(one.getEndTime());
}
+ } else if (one.getEndTime() != null) {
+ return -1;
}
+
if (two.getStartTime() != null) {
if (one.getStartTime() == null) {
return 1;
} else {
return two.getStartTime().compareTo(one.getStartTime());
}
+ } else if (one.getStartTime() != null) {
+ return -1;
}
+
if (two.getCreateTime() != null) {
if (one.getCreateTime() == null) {
return 1;
} else {
return two.getCreateTime().compareTo(one.getCreateTime());
}
+ } else if (one.getCreateTime() != null) {
+ return -1;
}
return 0;
}