Fix bug with exit on idle time. (GH-32)
fixed code formatting