Fix build errors when doing a build clean