Various bug fixes with timer and restart method