Copied from inner class.