fixed dirty chain bug