MySQL bug fix

toArray() was done twice