Fixed the end pattern in views