Fixed state parameter testing

logic for state parameter testing in com function fixed