Apply fix as in https://github.com/lpod/lpod-python/commit/c57815bdadff878e622756fb456727d515e451f7