fix to sql for recent activity block