fixes build matrix middleware