Fixed isRegistered check