Fix some API issues