Fix for #1677

- Fix for #1677

Branch fix/openfile