Follow-up work of #1640
Follow-up work of #1640