fix param checking