Fixes use of changed API