Fixes to allow IE9 to work