fix image display bugs