Fix getSize on DOM modification