update bug fixing function