fixed parsing of DEBUG flag in environ