Fixing issue with decoding None