1.1: increase scope of function and check for empty data
Merge branch 'refs/heads/1.1-cdrs' into 1.1