Corrected several bugs in simulator
Let external manifest have the chance to alter deps