fix on score calculation (client-side) through js