fix bug in typing feature