Fixed minor testing bugs