fixed range bug