Fix some API issue