Fixes issue #6 and Django 1.5 compatibiliy