Added test flag and fixed small bug