range bug fixed