Fixed deprecated functions