Assert limit is a positive integer
Fix according to the spec
Type hinting