Fix condition for dependency check