Using try/catch for IE to work