fix a crash