fixes infinate recursion on django 1.6