fix image transition bug