fix compiling error of js template