Fixed to allow usage in  django 1.4.2