fixed overflow bug and lost comment bug