Fixed the bug that score was not saved correctly.