fix case when canvas has longer height than width
fix canvas height > width