fixed bugs with logger