added code to handle initial width update