Fix parent query. Fixes #25