Correcting deprecated syntax