New test cases and debugging