fix passing back injected function