fixed error from attempting to tuple-unpack a possibly None value