public function sortCollectors()
{
// move message collectors to end, so other collectors can add message to it at the end time.
$this->collectors;
if (isset($this->collectors['messages'])) {
$m = $this->collectors['messages'];
$t = $this->collectors['time'];
unset($this->collectors['messages']);
unset($this->collectors['time']);
$this->collectors['time'] = $t;
$this->collectors['messages'] = $m;
}
}