Properly substitute third string variable