fix calculating probabilities
fix exception CursorNotFound