fixed log functions