Fixing bug in model export