Fixing a bug in the query compiler
Updating the TODO