Utility function.
bugfix