fixed rec query syntax issue