Fix bug, Add comments