Fix incorrect argument check