The errors when Deleting a Dock from the config can be fixed by removing the forced refresh of the window in the GUIRemove function.
This type of refresh isnt needed in a callback from an options table as there is a full refresh after every set/func called. If this function is called from elsewhere in the code not triggered from the options table then a refresh should be done there.
The mechanism for triggering a refresh properly is
I'll get some protection in place for a refresh being triggered from a callback but for now it'll be best to avoid it