Fixed compilation errors in model package.