Partial pull of #186