fixed bug with command line arguments