fixed search for unauthorized access