Fixed a typo in GetEntity-function