Fix glitch when user change orientation

This bug affects screen resolutions A x B with ( B > A)