Upstream master

Fixes issues with upgrade file which should remove files.