Fix crash in NetworkLink ES when going to sleep in less than 15 secs after a wake-up. Better error handling. Code improvements.