fix log bugs