Minor fixes

fixes #1308
also improves checking for #2706
and adds some crutial IE8 JavaScript fixes