Model export bug fixes.