fix select statement search scope