fixed undefined uid bug