Fixes issues sending correct browser response codes