fix a typo in getEntity that caused it to return null attributes