Fixes to work with the last api.