Fix box matrix