make sure to handle the case where there are no attached packages properly