clean up code trying to fix ie9 bug