minor fixes in views.py