Fix template path issues