Updated package detection logic in rx_pkg