Fixed some issues with reverting Pipeline