fix logging and Q-agent-ordering