I have resolved my problem.
Was running the serialized connection code in the wrong place. I was supposed to run it before using any of the objects that are being shared between the threads. In this case, I was using "db" before creating the new serialized connection.