Unit test and fix for score method