Update code for modal resize with fixes