Custom template sending fix