fix template error if data isnt defined on table