Fixing the buffer resizing
Upgrade script