fixes compatibility django 1.6