fix api bugs

Change-Id: I0a05fc01d4a7afaa946fad52f1d6998c93263c02