Horrible stuff for handling parent element resize defensively