Backport a couple of fixes from client_stderr branch

"It must be Thursday. I never could get the hang of Thursdays."

Also, #build