bugfix in record_demo