Bug fix on entities.