bug fix for django 1.4 1.5