fix object typechecking