Remove use of deprecated APIs

Whoops, thanks :+1: