Fixing bug when range length is 0
Merge branch 'devel'