bug fix of mysql reconnect