Updated work generator to avoid bad events