Revert removed code from previous merge