updated clearing to work in ie8