Fix param check being the wrong way around