Fixed  opening in read-only mode