Added null check to disconnect.
Updated build.