corrected type check errors