no more IndexError if no walls on edges