Fix affecting Django < 1.6