remove invalid dependencies