updated tests
Fix reference resolution