Fix to properly include mode parameter

[ci skip]