Remove panic call from template func.