Made the detection of whether or not it packaged more robust.