Fixed search API bug