Fixed failed resizing