Fixed some testing bugs.