Fixes issue logging missing variable