fixing mysql disconnection