Added dangerous restrictions to template

Fixed #714