Fix create_credit method