fixing bug in parsing arguments