Fixed check_plain sniff and other function call sniffs, added test case.