IE9 fixes...

Another try to fix #663 and related issues...