fix minor bugs template