fixing bug with assignment of :ext_id