fixed set_read_only condition