fix dodgy argument length checking