Fixed archiving bugs.