Fixing bug with the logger