Fix otp-selector and add some debug logging