Fixed revert damage and refactor cod

Fixed issue concurrent passing data to updateengine.