Following L5 change to middleware