fix image shrinking problem #291