Bug fix in entity.py. Leftover from a previous change.