Magnetoresistance in weakly localized regime