Fix access to db cursors and listView