Don't allow negative 'remaining'. Fixes #5