Revert common function. There are slight differences between the 2 impls