fix image resize issue