section notes

I am using end of section endnotes and have the issue that when using the field “Chapter” in the header on the right hand page, it does not show the current chapter but the name of the first chapter always when the notes run over onto a right hand page.
Is this a bug or am I doing something wrong? Is there a work around at all?