Fixed deprecated API