modify upto/downto for compatibility
Merge branch 'master' into iij