Fix bug for Django-1.3.x