Fix regression passing cloned state to mkctx()
Fix bug in update()