fix for read_only mode