fix to update class of entity