fixes bugs while building the box