fix TypeError.