Correcting a numberFormat Exception