Fixed a bug when an Entity has no controllers

Fixed a bug when an Entity has no controllers and
Entity.getControllerCount is called