Fix crash when collapsing item off screen