Bug fix on opening a saved file