Fix a lot of bugs; Beta-mismatch