diff --git a/src/space.c b/src/space.c
index c26b8bb..f1ace4c 100644
--- a/src/space.c
+++ b/src/space.c
@@ -313,10 +313,10 @@ StarSystem** system_getJumpPath(int* njumps, char* sysstart, char* sysend) {
       neighbour = A_newNode(&systems_stack[cur->sys->jumps[i]], cur);
       cost = A_g(cur) + 1;
 
-      if(A_in(open, neighbour->sys) && (cost < A_g(neighbour)))
+      if(A_in(open, neighbour->sys))
         open = A_rm(open, neighbour->sys); // New path is better.
 
-      if(A_in(closed, neighbour->sys) && (cost < A_g(neighbour)))
+      if(A_in(closed, neighbour->sys))
         closed = A_rm(closed, neighbour->sys); // Shouldn't happen.
 
       if(!A_in(open, neighbour->sys) && !A_in(closed, neighbour->sys)) {