Fixes

Replaced deprecated functions