fixing weird event emitter stuff