reset logic is changed. Instead of sending exit, @bash.close is being called which kills all the children
inserted clearTimeouts to avoid race conditions