Fixed channel parsing
Fixed environment variables to increase compatibility with linux