Fixed Django 1.6 incompatibility issue.