fix #171, #172