Fixed no-heading case to work correctly