fixed difficult bug