more fixes to views.py