Fix managed dependency removing