Fixing variable substitution in POST commands