Proper reset the elements, to avoid flickering