Implements #1253