Fix crash when opening Graphics option in game