Why a capture listener? Rest of changes seem ok.