Fix bug in snake game