get active mode and passive mode working as expected