fix bug in typing