Fixing event source creation bugs