fix score writing issue