workaround bug #3 fix wrong variable usage