fix class context for recursivity