normalize width calculation so never get a negative value