Fix bug in left, top boundary calculation.