Errors after Revert

After revert, the preview window breaks and so does copy-layer feature.