fixing DM connecting bug