bugfix in range header, add unit tests