improvements to handle empty content