fix bug in b