Implements #979