Corrected box index handling for storing