Fix for issue 89 (ERMDDeleteButton throws exception when deleting newly created object)

Fix for issue 89 (ERMDDeleteButton throws exception when deleting newly created object)