fix compensation bug