Further fixes over - #20 and unlocking on fetching previous state.
Further fixes over - #20 and unlocking on fetching previous state.