Fixed SQL error in advanced search
Merge remote-tracking branch 'origin/master'