Added some event magic