Rearranged package removal so it works