fix part of #561