Given the the two states $\rho$ and $\sigma$ of a quantum system, with $|\psi\rangle$ and $|\varphi\rangle$ as their purification respectively, the fidelity is defined as:
$$F(\rho,\sigma)=\max_{|\psi\rangle,|\varphi\rangle}|\langle\psi|\varphi\rangle|$$
During the derivation of the expresssion, $|\langle\psi|\varphi\rangle|$ follows this inequality:
$$ |\langle\psi|\varphi\rangle|\leq tr|\sqrt{\rho}\sqrt{\sigma}|=tr\sqrt{\rho^{\frac{1}{2}}\sigma\rho^{\frac{1}{2}}}$$
My workings for $tr|\sqrt{\rho}\sqrt{\sigma}|$ is as follows:
$$tr|\sqrt{\rho}\sqrt{\sigma}|=tr\sqrt{(\sqrt{\rho}\sqrt{\sigma})^\dagger(\sqrt{\rho}\sqrt{\sigma})}$$ $$=tr\sqrt{(\sqrt{\sigma}\sqrt{\rho})(\sqrt{\rho}\sqrt{\sigma})}$$ $$=tr\sqrt{\sigma^{\frac{1}{2}}\rho\sigma^{\frac{1}{2}}} $$
Why do I get an expression that is different from the definition?