Reverting Rui's changes in non-intrusive way