Changed some vital code