fixed dirty bug