Fixed bug with formats and ref data