Fix resize with history