Delete metadata if an empty array. Fixes #117.