Forgot to check if MySQL was enabled before closing connection