adjust readonly check