Potential fix for using as lib, breaks usage as CLI