Fixed logic for reading test-data.