Fixing progress bar so that it becomes 'disabled' when the querying is finished