Fixed crash when shrinking width