some fixes in eventfunc