fix the assertion errors while propagating all locals