Fixed segfault in Resource when content is empty