fix bug & make improvement