These two functions don't belong here.