Fixing Template def