Update main.class.php for revert