fix undefined logs