Remove newline character from disconnect message
Fix missing ( in SQL and add commit to transaction