Fixed deprecated package function