Changed to use public api.