Fix Invalid SQL
Fix Close Method