Fix error on folder removal