fixing js errors in older IE