Fixed weird segfault when going to non-existing neighbors