Reordered the commands to capture queries for bug work around