Bug fix. Using cursor saving data.