Fixed generator handler null pointer exception.