Fix var error and update