bug write fix