fix a bug in 6a12e36