Fixed small bug in test method