fix duplicate boxes