Fixes closing of cursor in onLoadFinished of sample