Rebased onto 1.1.x