Fixed some update related bugs