fix query WHERE test