Fixed issue with scopeQueryWithParams() method not checking for the right values