fix bugs ralted codings