upgrade and bug fix