Hotfixes for bug which caused copying folder to fail