fix markup calculation