Added CustomEvents support