restrict search type limit and offset properly
restrict search type limit and offset properly