Fix error with checking for active neighbors