Fixed crash + updated VS2010 solution

Fixed a crash that sometimes happened when the client was disconnected
from the pool