Removed deprecated methods.
Check for range correctly.