fix an issue when restoring deleted folders

@dinhviethoa