Resolve width calculating problem