fixed a couple this-> things with tempaltes  (gcc compat)