fix to make it work in latest django