Metastable phase formation during solidification of undercooled melt