Range Fixes

Some fixes related to merge of #1

Thanks! :)

(I've also removed useless spaces and added missing semicolon — but in a dedicated separate commit; hopes it's ok.)