Fixed bug in SQL when retrieving all open and active games