Changes to make IE8 work