fixed various patches