Command line flags now working properly