Tweaked code; the identical-to-server check seems to be working.