Fix occasional resize artifacts