Change middleware order