fixed issue of wrong ranges in coffeescript