fix exception when loging is disabled