Added some variables to adjust the updateInterval and resizeInterval