1.1.2: added support for readonly state