Fixed bug: not extracting proper internal id