catching invalid template