Fixed incorrect sequence extraction.