Fix search function
#236 Fix several bugs in new styles