bugfix: Corrected truncation of extracted data - it was incorrectly removing too much from the end