tweaks to work with django1.6