Close DB cursor ofter reading permissions