don't use native setImmediate - doesn't work for IE 10