Add back missing codes which was probably removed by the previous revert