Bug fix for double set-events