Fix list-targets when a data is undefined/null.
Implements the recording on/off.