Changed some deprecated methods