Fixed an invalid pointer in getMaxScore used for contracts