Fixed AssignBoxes, it was assigning them to wrong type