pileup in main

And fixed command line segfaulting