several bug fix and add skill logic