Fixed deprecated warning