Fix extract functions