Solved NPE when releasing was done with no dataset selected for editing.