Fixed NPE on cursor on single file buffer