improve handling of extended_data
fix typo thanks to perl critic