Basically took the last two fixes and put them in the actual php files. It was driving me nuts the other way. Full archive attached.

More...