Correctly choose end of number (i.e. if it ends in 'w' with nothing following)