Fix param check

Should fix #271