Ensure that this is only called when necessary.