fix error on getImageSize