fix error handeling on search