massive fix for views.py