Heterogeneity effects in the multilayer adsorption of gases on solid surfaces