Fixing bug with extract only returning a single line