[issue #177] fixed queries in views