bug fix views.py