Fix log problems