fixed a bug in GhostEntity, random levels should not crash anymore