bugfix in backup function