Further bugfixes for django 1.7