Out of bounds option in select_packages causes array error