insert middleware at position 0 instead