Fix error with django 1.3