Add return packet sync, handle corner cases and reboot properly