Fix some bugs with extensions manager