Fixed ProjectPreview page with working sql statements