JavaScript error when saving a new dataobject

I was getting a javascript error with I create a new record by clicking the "Save and Close" button. 

after a bit of messing around found that if I add 


		Controller::curr()->getResponse()->addHeader('X-Reload', true);

to the GridFieldBetterButtonsItemRequest.php it works. 

this happens because the LeftAndMain only follow redirects if the X-Reload is true.