fix image overflow bug