Fix typeerror.