improved read only mode, fixes #206