fixed bug in dependency handling.