Fix some bugs that show up with other SDKs.