Modified the way dependancies are checked