Fixed a error when search a end pattern in views