Fixes most range issues