fix dbref in array javascript mngt