Put the code that checks stop values together. Don't clamp a cur value of -1 to 0 (should not happen right now).