Fixes for: incorrect semantics of dem offsets, and wrong Trove calls