Fixing stack overflow issue caused by logging user ID.