Proposing my workaround, by adding guard variable

I haven't tested it yet, hope somebody will do.