modify some more ugly codes