Metadynamics is an efficient method for simulation of the free energy of many-particle systems. Over the last several years it has been applied to study a wide variety of systems, ranging from simple fluids to biological macromolecules. The method relies on uniform sampling along specified collective variables or order parameters. Such order parameters, however, are often bounded, and metadynamics algorithms as originally developed suffer from systematic errors at the corresponding boundaries. While several approaches have been proposed in the past to correct these errors for unidimensional systems, no method exists to fully correct these errors in multi-dimensional systems at points where multiple boundaries meet. Here we present a correction scheme that circumvents this limitation.