added proper dependency handling -  fixes #26