Fix type for createRange method