fixed selection query with params