Fix middliwhere