Fixing bug when clicking 'Document (Properties)' menu item