fixed bug with log