added undefine check
Merge pull request #42 from nsue/fix-onUpdateRemoteScore

added undefine check