fixed search controller

also added error page for searching