added query number to query to prevent mysql error
fixed another migration error