Fix several API issues.