Fixed errors of first template version