Fixed overlapping horizontal and vertical wall problem.