fixed handling of minus range