Minor tweaks, use async msync(), fix cursor_close crash