Fixed an issue where the process hangs during set_position.  The method opens the second MySQL connection, which for some reason hangs the first one.  Fixed the issue by closing the first connection before opening the second one.
Merge branch 'feature/fix-for-hang-in-set_position'