game middleware fixed