Phase transitions in NbSe3