Fix bug in argument checking which returns false negative.