Fixed bug where logger logging would cause a loop.