fix image resizing