mediate affect & fix bug