Fixed client2 error checking code