Second revision still not the final version game fails on looping through and closing