fix the penalty calculation