implement #1577