Added a fixdemodata function.