Minor perfomance update and fix to entity clone