fixing decoding issues when we have None