fixed a bug in revision b1d117199fdb