Fixes detached persistency bug
Merge pull request #276 from Junkern/issue#209

Fixes detached persistency bug