item width calculation bug fix