update contract bug