fixed issue where browser width was not updated correctly