Fixed a rare edge case bug and added a hook for css classes on the search form