I will try to reimplement it as suggested, for now I addded a classbridge which basically does the same thing. There it works for sure.