Implements #334