fixes sql statement but putting quotes around true for compatibility with sqllite