Fix backup and restore issues. (#1)