Handle undefined header values
Fix indentation