Fixing template processing.