Fix #62, and rework mkrange()