Fixed stack trace printing for browsers other than chrome and also made
the Scheduler's polling function stop polling when the scheduler is
destroyed.