formation fixes and catches
ready state fix (document.readyState is readonly)