fix undefined attribute error that stopped the tool working in IE8