For those interested in the resolution, I have come up with an , at least approximate, answer. By switching over to a global events approach, and making a mistake I realized what the problem was. The mistake I made was (in global events) to use the same name for the function but not declaring it...