Fix BCodeEditor document saving