prevent overlapping figures