fix to Gambit's crash