We studied the influence of sample preparation and defects in the superconducting properties samples using atomic ratios of Mg:B=1:1 and Mg:B=1:2. Samples were characterized by SEM, and XRD, and the magnetization properties were examined in a SQUID magnetometer. The presence of Mg vacancies was determined by Rietveld analysis. Most of the samples exhibited sharp superconducting transitions with Tcs between 37- 39 K. We found a strong correlation between the crystal strain and the Tc. This strain was related to the presence of Mg vacancies. In addition, results showed that some samples degraded with time when exposed to ambient conditions. In these samples the Tc did not change with time, but the superconducting transition became broader and the Meissner fraction decreased. This effect was only present in samples with poor connectivity between grains and smaller grain sizes. The degradation was related to a surface decomposition as observed by X-ray Photoelectron Spectroscopy. No correlation was found between this effect and the presence of Mg vacancies.