Cleaned some bugs at update method