fixing ruby bug in template