Fixes to match the new API