Bug fixes for ie8