fix wrapper upgrade