fix newDocument and openDocument actions