baseSurface undefined bug fix