Fix log function.