fixed problem with @if in views