fixed bugs in how mdp templates are used, now works accross different systems