Fixed broken revert button for new documents.

Sadly, it might justify a new release.