fixed issue of image resetting on screen orientation rotate