fix a bug on bdf3