Fix for bug when rapidly adding and removing entities.
Merge branch 'master' of https://github.com/jesajx/inda12-proj