Fix some minor issues in search