prevent to insert template twice