fixed bug in isWall