fixed segmentation error when no argument is specified