Fixes issue with emtpy tables if data points are missing. Fixes #1197