Fixing bugs related to emitter inheritence instead pure functions