[WIP] RMSD segfaults with memmapped arrays

Steps
- [x] add test
- [x] fix bug