Compute alignment correctly