fixed CursorIndexOutOfBoundsException