Fix extract bug