mode parameter from listen block now correctly appears in template