Warnings fixed, added #disconnect.