fix a fatal bug