fixed undefined user issue