Fixes bug in game5 and DRY's it up