ie8 and js gates
another method
fix conflict