I've always run into problems using single quotes inside of the varibles, and it goes away generally when I remove them.
Inside templates you can't use single quotes unless you wrap the variable in braces... In *conditions* though it is not parsed within double quotes. Hope that clears it up.