finally fixed the view update issue