Changes to make edit queries work.