Fixed wrong argument passed from CommandFactory to RestoreCommand

Fixes #298