fixed error in parseNumber function