Bug fix for activities' query methods in SQLCommander.