fix a runtime error in chapter5 tickets2 code

Fix an error while trying the code on http://gofiddle.net