 			existingTime = getTime(readData, numTimeBytes, timeOffset);
 
 			// Send it to ACM
-			while (!existingTime) {
+			while (existingTime) {
 				Serial.write(existingTime);
 				existingTime >>= eightBits;
 			}

			delay(waitforWriteResponse);

			// Make sure time on card is zero when registered
			if (!id) {
				preparePayload(COMMAND_RESET_TIME, 0, 0, 0);
				sendCommand(CMD_WRITE, blockID, machineID);
				while (!id) {
					Serial.write(id);
					id >>= eightBits;
				}

			sendCommand(CMD_WRITE, blockID, userData);
			delay(waitforWriteResponse);

			while (id) {
				Serial.write(id);
				id >>= eightBits;
			}
