#648: added a workaround for read-only mode