Fix undefined variable notice in the recent activity block