Updating the Size of window better