Fix folder deletion problem