Correcting ttl code. Need to test with server, now.