fixed type in evaluating whether in test mode