Fixed bug in calling logger