Fixed an NPE with desyncs during drags, minor tweaks to open/close handling.