fixed failure of removing framework sometimes