Fixed nullPointer in Mediator's constructor