Fix broken dependencies and remove old versions