fixed log bugs