Fixed usage of some recently deprecated functions