Update onPath() to return object

See 97d170f