fixed log funct