fix bugs and allow simulation to run on current PDs