Continuation of #832

closes #832