Fix bug in arg detection