fixed log (undefined)