fix bug: get content width correctly