Fix setting range in peak_range caused Internal Server Error