update and bug corection