Fixed a serious bug on resizing when img ratio was bigger than device one