Fixed all bugs to working version pre search