bug fix code improve