limit may not be None at this point, perhaps a default value should be specified on line 105