fix log functions