Fix of trying to close Cursor twice

The warning Android prints in logcat is: Close cursor android.database.sqlite.SQLiteCursor on null twice or more