4.21 fixes

Fixed all deprecated calls, now compiles after the 4.21 changes.