Fixed a bug with rangef