extract_rules fixed for small test case