Fixing querying on super classes