fixed regularization bug from Ariel