Fix typechecking problem