fixes to work with ie < 10 and other browsers