Fixed bug that caused old packages not being deleted