minor tweaks allowing update to Django 1.4