quote variables to fix a few bugs