Update to use engine's entity index