fixed and improved stuff in search