Fixed bugs due to recent changes with multiple boxes