ddc5f63 Fixes issue with modal sometimes caching sizes when hidden #895, #951