Fix reverted code