fixed massive getWallDist bugs