fixed logging bug now I think