Fix missing assignment, image not rotated
Horizontal boundaries and vertical boundaries