Correction to solution for basics_query to close DB connection.