Implements #1241