Code style and template bug