Small fix to middleware settings