Getting "new document" button working correctly