added middleware requried by regions feature