fix reserved parameters are not replaced every time

Related to #22, I tried to fix this issue.

All tests are ok, it seems good to me but not 100% sure.
Can you please look into it @alecsammon ?