fixed argument error check bug