fix for anonymous classes + tests