Cursor state hardening & a few fixes