Fix some code that was not converted to new APIs.