fixing edge case causing right edge walls not reacting to player collision