Solved overlapping boxes bug