fixed a bug introduced by using __DIR__ in class definitions