Fixing Facet SQL bug