fixed various copy&paste bugs