fix image in database null error