fix bugs in backup