fix bug in reading args