Better width calculation