Fix issue in toString override template

Signed-off-by: Luca Bernardi <luka.bernardi@gmail.com>