Fix bugs on Update method.