threshold scaling fix