server upload fix and template quoting fix