bugfix in isEntityExisting()