fixing index issue in boxes