fixed typemissmatch problem