fixed a case where the last package may not recieve it's deps before returning