corrected problem checking for dependancy