more robust dependency checking.