Fix UnboundTypeError.