Fixed ending bug and sharping bug