fixes for django1.7