fixes for ranges