Update Entity.php

Fixed a crash