Fixing model building script