Fix headers array, fixes #2821