Fix backup and restore