Implements #823