Bugfix in stub generator, now also using notifications