Fixed bug creating a new logger value when it was not necessary