Fixed stack_overflow issue and added game turn-around logic