fixed trace_dot to be a litle faster...