Too many sql queries

Made change to synch badge update date to reduce number of sql queries.