fix bug in extract_spire