fix resize problem when collapsed content is shown