Changed some deprecated functions