fix quaternions to flat arrays