Fixed: make sure there is a valid handle before do a reset.

If reset method is called without a valid device handle, we will
probably have a crash. So, call managed_open before calling reset.