Fix compile without depercated method

2 jobs for master in 2 minutes and 37 seconds (queued for 26 seconds)