Fixed incorrect profit function in modified ssgs.