Check the Connection header is there before testing against keep-alive.
Use SafeCall on ReloadScripts hook.