fixing middleware when no officium defined