Fixed the case where all fragments would be on top of each other.