fixed score calculating bugs