fix case when canvas has longer height than width